package org.zht.dormpro.auth.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.zht.dormpro.auth.model.SysUserRole;

import java.util.List;

public interface SysUserRoleMapper {
    @Delete({"delete from sys_user_role where id = #{id,jdbcType=INTEGER}"})
    int deleteByPrimaryKey(Integer id);

    int insertSelective(SysUserRole record);

    @Select({"select",
        "id, sys_user_id, sys_role_id, create_time, modify_time, creator, mender",
        "from sys_user_role",
        "where id = #{id,jdbcType=INTEGER}"})
    @ResultMap("org.zht.dormpro.auth.mapper.SysUserRoleMapper.BaseResultMap")
    SysUserRole selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(SysUserRole record);

    List<SysUserRole> getUserRoRL(@Param("id") Integer id,@Param("urStatus") String urStatus);

    int deleteUserRoRL(@Param("id") Integer id,@Param("urStatus") String urStatus);
}